import 'package:dmz/base/pageWidget/base_stateful_widget.dart';
import 'package:dmz/base/widget/defult_widget.dart';
import 'package:dmz/business/mine/controller/lost_updata_controller.dart';
import 'package:dmz/business/mine/widget/lose_updata_widgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

class LostUpdataPage extends BaseStatefulWidget<LostUpdataController> {
  const LostUpdataPage({super.key});

  @override
  String titleString() => '失窃上报'.tr;

  @override
  List<Widget>? appBarActionWidget(BuildContext context) {
    return [
      DefaultText('上报历史'.tr, 28.sp, textColor: const Color(0xFF23C565))
          .paddingOnly(right: 32.sp)
          .addGestureDetector(() => controller.turnLoseHistory())
    ];
  }

  @override
  get updateId => 'lostUpdata';

  @override
  Widget buildContent(BuildContext context) {
    return Column(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
      LostUpdataWidgets.inforWidget(
          controller.contents, controller.inforSelects),
      LostUpdataWidgets.bottomWidget(
          controller.selectModel != null, controller.bottomClick)
    ]);
  }
}
